package com.java.test2;

public class Animals extends Organisms {
	// 属性
	private String animalName;
	private String animalSex;
	private int animalAge;

	// 构造方法

	public Animals() {
		super();
		System.out.println("执行了Animals的默认方式：");
	}

	public Animals(String animalName, String animalSex, int animalAge) {
		super();
		this.animalName = animalName;
		this.animalSex = animalSex;
		this.animalAge = animalAge;
		System.out.println("执行了Animals的有参方式：");
	}

	// 行为
	public void doEating() {
		System.out.println(animalName + "   is eating!!!");
	}

	public void doSleeping() {
		System.out.println(animalName + " is sleeping!!! ");
	}
	// setter，getter

	public String getAnimalName() {
		return animalName;
	}

	public void setAnimalName(String animalName) {
		this.animalName = animalName;
	}

	public String getAnimalSex() {
		return animalSex;
	}

	public void setAnimalSex(String animalSex) {
		this.animalSex = animalSex;
	}

	public int getAnimalAge() {
		return animalAge;
	}

	public void setAnimalAge(int animalAge) {
		this.animalAge = animalAge;
	}

}
